home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 November
/
CMCD1104.ISO
/
Software
/
Freeware
/
Comunicatii
/
enigma
/
esetup.exe
/
%17
/
Highlight.js
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
Text File
|
2003-06-08
|
295 b
|
10 lines
function Highlight(sKeyword,sColor)
{
var range=document.body.createTextRange();
while (range.findText(sKeyword,100000,0))
{
var sHtml=range.htmlText;
sHtml="<span style=\"background-color: "+sColor+"\"><font color=#000000>"+sHtml+"</font></span>";
range.pasteHTML(sHtml);
}
}